package com.dingreading.cloud.soms.entity;

import com.dingreading.cloud.soms.dto.CmorderDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2024-09-11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("cmorder_apply")
public class CmorderApply implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    private String corpUid;
    private String storeUid;
    private String memberUid;

    private String addStaffUid;

    private String addStaffName;

    private String lastStaffUid;

    private String lastStaffName;

    private String applyCode;

    private String remark;

    /**
     * 类型 1.变更 2.退费
     */
    private Integer type;

    private String typeName;

    private String orderCode;

    private Double orderAmount;

    private Double carryidAmount;

    private Double consumedAmount;

    private Double unconsumedAmount;

    /**
     * 收款/退款金额
     */
    private Double applyAmount;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date changeDate;


    @Column(ignore = true)
    private List<CmorderDto> logList;
    @Column(ignore = true)
    private List<CmorderApplyImg> imgList;
}
